package com.roger.myHome.test;

public class Person {
    private int age;
    private double discount;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
        if (age > 60) {
            this.discount = 0.1;
        } else {
            this.discount = 0;
        }
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }


}
